package com.zhiche.lisa.tms.dao.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 运单附件表
 * </p>
 *
 * @author qichao
 * @since 2018-08-16
 */
@TableName("lisa_shipment_attach")
public class ShipmentAttach extends Model<ShipmentAttach> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 装车单号
     */
	@TableField("shipment_code")
	private String shipmentCode;
    /**
     * 运输任务编号
     */
	@TableField("ship_task_code")
	private String shipTaskCode;
    /**
     * 用途，10:装车 20:运抵
     */
	private String purpose;
    /**
     * 附件类型：01-正面；02-反面
     */
	@TableField("attach_type")
	private String attachType;
    /**
     * 附件key
     */
	@TableField("attach_key")
	private String attachKey;
    /**
     * 附件名称
     */
	@TableField("attach_name")
	private String attachName;
    /**
     * 创建人
     */
	private String creator;
    /**
     * 备注
     */
	private String comment;
    /**
     * 创建时间
     */
	@TableField("gmt_create")
	private Date gmtCreate;
    /**
     * 更新时间
     */
	@TableField("gmt_modify")
	private Date gmtModify;

	/**
	 * 数据来源
	 */
	@TableField("data_sources")
	private String dataSources;

	/**
	 * 审核状态
	 */
	@TableField("auth_status")
	private int authStatus;

	/**
	 * 下载路径
	 */
	@TableField(exist = false)
	@JsonSerialize(using = ToStringSerializer.class)
	private String downloadPatch;

	/**
	 * 查看路径
	 */
	@TableField(exist = false)
	@JsonSerialize(using = ToStringSerializer.class)
	private String lookPatch;

	public String getDownloadPatch() {
		return downloadPatch;
	}

	public void setDownloadPatch(String downloadPatch) {
		this.downloadPatch = downloadPatch;
	}

	public String getLookPatch() {
		return lookPatch;
	}

	public void setLookPatch(String lookPatch) {
		this.lookPatch = lookPatch;
	}

	public String getDataSources() {
		return dataSources;
	}

	public void setDataSources(String dataSources) {
		this.dataSources = dataSources;
	}

	public int getAuthStatus() {
		return authStatus;
	}

	public void setAuthStatus(int authStatus) {
		this.authStatus = authStatus;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getShipmentCode() {
		return shipmentCode;
	}

	public void setShipmentCode(String shipmentCode) {
		this.shipmentCode = shipmentCode;
	}

	public String getShipTaskCode() {
		return shipTaskCode;
	}

	public void setShipTaskCode(String shipTaskCode) {
		this.shipTaskCode = shipTaskCode;
	}

	public String getPurpose() {
		return purpose;
	}

	public void setPurpose(String purpose) {
		this.purpose = purpose;
	}

	public String getAttachType() {
		return attachType;
	}

	public void setAttachType(String attachType) {
		this.attachType = attachType;
	}

	public String getAttachKey() {
		return attachKey;
	}

	public void setAttachKey(String attachKey) {
		this.attachKey = attachKey;
	}

	public String getAttachName() {
		return attachName;
	}

	public void setAttachName(String attachName) {
		this.attachName = attachName;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtModify() {
		return gmtModify;
	}

	public void setGmtModify(Date gmtModify) {
		this.gmtModify = gmtModify;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "ShipmentAttach{" +
			", id=" + id +
			", shipmentCode=" + shipmentCode +
			", shipTaskCode=" + shipTaskCode +
			", purpose=" + purpose +
			", attachType=" + attachType +
			", attachKey=" + attachKey +
			", attachName=" + attachName +
			", creator=" + creator +
			", comment=" + comment +
			", gmtCreate=" + gmtCreate +
			", gmtModify=" + gmtModify +
			"}";
	}
}
